import streamlit as st
import random

with st.echo():
    st.button("Reset", type="primary")
    st.button("Reset2", type="secondary")
    st.button("Reset3", type="tertiary")

with st.echo():
    text = "投掷结果:"
    left, middle, right = st.columns(3)
    if left.button("1D6", icon="🎲", use_container_width=True):
        random_integer = random.randint(1, 6)
        text += str(random_integer)
    if middle.button("2D6", use_container_width=True):
        random_integer = random.randint(1, 6) + random.randint(1, 6)
        text += str(random_integer)
    if right.button("3D6", use_container_width=True):
        random_integer = random.randint(1, 6) + random.randint(1, 6) + random.randint(1, 6)
        text += str(random_integer)

    st.write(text)

